package com.example.demo.service.Impl;

import com.example.demo.entity.Manager;
import com.example.demo.repository.GenericRepository;
import com.example.demo.service.GenericService;

import java.io.Serializable;
import java.util.List;

public abstract class GenericServiceImpl <T extends Serializable,ID extends Number> implements GenericService<T,ID> {

    GenericRepository<T,ID> genericRepository;

    public abstract void setGenericRepository(GenericRepository<T, ID> genericRepository);
    @Override
    public List<T> queryAll() {
        return genericRepository.queryAll();
    }

    @Override
    public void create(T t) {
         genericRepository.create(t);
    }

    @Override
    public T queryById(ID id) {
        return null;
    }

    @Override
    public void modify(T t) {
        genericRepository.modify(t);
    }

    @Override
    public void removeById(ID id) {

    }
}
